package com.eltsistemas.view;

import com.eltsistemas.view.agendamento.Frm_Agendamento;
import com.eltsistemas.view.cilindrada.Frm_Cilindrada;
import com.eltsistemas.view.cliente.Frm_Cliente;
import com.eltsistemas.view.fabricante.Frm_Fabricante;
import com.eltsistemas.view.fornecedor.Frm_Fornecedor;
import com.eltsistemas.view.funcionario.Frm_Funcionario;
import com.eltsistemas.view.itemdoservico.Frm_ItemDoServico;
import com.eltsistemas.view.modelo.Frm_Modelo;
import com.eltsistemas.view.placa.Frm_Placa;
import java.awt.Dimension;
import java.awt.GraphicsEnvironment;

public class Frm_Principal extends javax.swing.JFrame {

    private static Frm_Cilindrada frm_Cilindrada;
    private static Frm_Fabricante frm_Fabricante;
    private static Frm_Cliente frm_Cliente;
    private static Frm_Fornecedor frm_Fornecedor;
    private static Frm_Funcionario frm_Mecanico;
    private static Frm_Modelo frm_Modelo;
    private static Frm_Placa frm_Placa;
    private static Frm_Agendamento frm_Agendamento;
    private static Frm_ItemDoServico frm_ItemDoServico;
    
    public Frm_Principal() {
        initComponents();
        Dimension dimensao = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getSize();
        this.setSize( dimensao );
    }

    protected void dialog_Cilindrada()
    {
        frm_Cilindrada = new Frm_Cilindrada();
        frm_Cilindrada.setModal(true);
        frm_Cilindrada.setVisible(true);
    }
   
    protected void dialog_Cliente()
    {
        frm_Cliente = new Frm_Cliente();
        frm_Cliente.setModal(true);
        frm_Cliente.setVisible(true);
    }
    
    protected void dialog_Fabricante()
    {
        frm_Fabricante = new Frm_Fabricante();
        frm_Fabricante.setModal(true);
        frm_Fabricante.setVisible(true);
    }
     
    protected void dialog_Fornecedor()
    {
        frm_Fornecedor = new Frm_Fornecedor();
        frm_Fornecedor.setModal(true);
        frm_Fornecedor.setVisible(true);
    }
    
    protected void dialog_Mecanico()
    {
        frm_Mecanico = new Frm_Funcionario();
        frm_Mecanico.setModal(true);
        frm_Mecanico.setVisible(true);
    }
    
    protected void dialog_Modelo()
    {
        frm_Modelo = new Frm_Modelo();
        frm_Modelo.setModal(true);
        frm_Modelo.setVisible(true);
    }
  
    protected void dialog_Placa()
    {
        frm_Placa = new Frm_Placa();
        frm_Placa.setModal(true);
        frm_Placa.setVisible(true);
    }
    
    protected void dialog_Agendamento()
    {
        frm_Agendamento = new Frm_Agendamento();
        frm_Agendamento.setModal(true);
        frm_Agendamento.setVisible(true);
    }
   
    protected void dialog_ItemDoServico()
    {
        frm_ItemDoServico = new Frm_ItemDoServico();
        frm_ItemDoServico.setModal(true);
        frm_ItemDoServico.setVisible(true);
    }
    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jToolBar1 = new javax.swing.JToolBar();
        principal = new javax.swing.JTabbedPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        mnu_Cliente = new javax.swing.JMenuItem();
        mnu_Fornecedor = new javax.swing.JMenuItem();
        mnu_Funcionario = new javax.swing.JMenuItem();
        mnu_item = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        mnu_cilindrada = new javax.swing.JMenuItem();
        mnu_Fabricante = new javax.swing.JMenuItem();
        mnu_Modelo = new javax.swing.JMenuItem();
        mnu_Placa = new javax.swing.JMenuItem();
        mnu_agendamento = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Oficina System vr 1.0");

        jToolBar1.setRollover(true);

        principal.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jMenu1.setText("Cadastro");

        mnu_Cliente.setText("Cliente");
        mnu_Cliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_ClienteActionPerformed(evt);
            }
        });
        jMenu1.add(mnu_Cliente);

        mnu_Fornecedor.setText("Fornecedor");
        mnu_Fornecedor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_FornecedorActionPerformed(evt);
            }
        });
        jMenu1.add(mnu_Fornecedor);

        mnu_Funcionario.setText("Funcionários");
        mnu_Funcionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_FuncionarioActionPerformed(evt);
            }
        });
        jMenu1.add(mnu_Funcionario);

        mnu_item.setText("Item do serviço");
        mnu_item.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_itemActionPerformed(evt);
            }
        });
        jMenu1.add(mnu_item);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Veículo");

        mnu_cilindrada.setText("Cilindrada");
        mnu_cilindrada.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_cilindradaActionPerformed(evt);
            }
        });
        jMenu2.add(mnu_cilindrada);

        mnu_Fabricante.setText("Fabricante");
        mnu_Fabricante.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_FabricanteActionPerformed(evt);
            }
        });
        jMenu2.add(mnu_Fabricante);

        mnu_Modelo.setText("Modelo");
        mnu_Modelo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_ModeloActionPerformed(evt);
            }
        });
        jMenu2.add(mnu_Modelo);

        mnu_Placa.setText("Placa");
        mnu_Placa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_PlacaActionPerformed(evt);
            }
        });
        jMenu2.add(mnu_Placa);

        mnu_agendamento.setText("Agendamento");
        mnu_agendamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_agendamentoActionPerformed(evt);
            }
        });
        jMenu2.add(mnu_agendamento);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE)
            .addComponent(principal)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(principal, javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mnu_cilindradaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_cilindradaActionPerformed
        dialog_Cilindrada();
    }//GEN-LAST:event_mnu_cilindradaActionPerformed

    private void mnu_FabricanteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_FabricanteActionPerformed
       dialog_Fabricante();
    }//GEN-LAST:event_mnu_FabricanteActionPerformed

    private void mnu_ClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_ClienteActionPerformed
        dialog_Cliente();
    }//GEN-LAST:event_mnu_ClienteActionPerformed

    private void mnu_FornecedorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_FornecedorActionPerformed
        dialog_Fornecedor();
    }//GEN-LAST:event_mnu_FornecedorActionPerformed

    private void mnu_FuncionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_FuncionarioActionPerformed
        dialog_Mecanico();
    }//GEN-LAST:event_mnu_FuncionarioActionPerformed

    private void mnu_ModeloActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_ModeloActionPerformed
        dialog_Modelo();
    }//GEN-LAST:event_mnu_ModeloActionPerformed

    private void mnu_PlacaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_PlacaActionPerformed
        dialog_Placa();
    }//GEN-LAST:event_mnu_PlacaActionPerformed

    private void mnu_agendamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_agendamentoActionPerformed
        dialog_Agendamento();
    }//GEN-LAST:event_mnu_agendamentoActionPerformed

    private void mnu_itemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_itemActionPerformed
        dialog_ItemDoServico();
    }//GEN-LAST:event_mnu_itemActionPerformed
   
    public static void main(String args[]) {
        
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Frm_Principal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JMenuItem mnu_Cliente;
    private javax.swing.JMenuItem mnu_Fabricante;
    private javax.swing.JMenuItem mnu_Fornecedor;
    private javax.swing.JMenuItem mnu_Funcionario;
    private javax.swing.JMenuItem mnu_Modelo;
    private javax.swing.JMenuItem mnu_Placa;
    private javax.swing.JMenuItem mnu_agendamento;
    private javax.swing.JMenuItem mnu_cilindrada;
    private javax.swing.JMenuItem mnu_item;
    private javax.swing.JTabbedPane principal;
    // End of variables declaration//GEN-END:variables
}
